import type { Column } from "@/components/CrudPage/type";

export function useSysApiProvider() {
  // 列配置
  const columns: Column[] = [
    {
      label: "标题",
      slot: "title",
      prop: "title",
      create: true,
      edit: true
    },
    {
      label: "分组",
      slot: "group",
      prop: "group",
      create: true,
      edit: true
    },
    {
      label: "路径",
      slot: "path",
      prop: "path",
      create: true,
      edit: true
    },
    {
      label: "方法",
      slot: "method",
      prop: "method",
      create: true,
      edit: true
    },
    {
      label: "处理函数",
      slot: "handler",
      prop: "handler",
      create: true,
      edit: true
    },
    {
      label: "操作",
      prop: "operation",
      slot: "operation"
    }
  ];

  return {
    columns
  };
}
